package pl.ydp.storage.events
{
	import flash.events.Event;
	
	import mx.collections.ArrayCollection;
	
	/**
	 * 
	 * Describes format of events dispached by IStorage. 
	 * It's connected with IStorage methods that returns file fist (i.e listDir method);	  
	 * @see pl.ydp.storage.IStorage  
	 */
	public class ListFilesEvent extends Event
	{
		
		/**
		 * Stores listed files
		 */ 
		public var listedItems:ArrayCollection;
		
		/**
		 * Additional informations about dispached event
		 */ 
		protected var _details:String;
		
		
		/**
		 * Constans for list dir compeleted event
		 */ 
		public static const LIST_DIR_COMPLETED:String = "listDirCompleted";
		
		/**
		 * Contructor
		 * @param type event type
		 * @param _listedItems stores listed files
		 * @param details additional information about event 
		 */	
		public function ListFilesEvent( type:String, _listedItems: ArrayCollection, details:String = null)
		{
			listedItems = _listedItems;
			_details = details;
			super(type);
		}
		
		/**
		 * Returns event details
		 */ 
		public function get details ():String{
			return _details;
		}
	}
}